package com.example.demo.controller;

import com.example.demo.domain.Menu;
import com.example.demo.service.Impl.MenuServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("menu")
public class MenuController {
    @Autowired
    private MenuServiceImpl menu;

    @GetMapping
    public List<Menu> gitALl(){
        return menu.list();
    }
}
